<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::get('/user', function (Request $request) {
	return $request->user();
})->middleware('auth:api');


Route::prefix('v1')->group(function () {
	//获取网盘密码
	Route::get('/get_net_oss', 'api\MainController@get_net_oss');

	//获取当前网盘使用人
	Route::get('/get_now_user', 'api\MainController@get_now_user');

	//踢掉当前网盘使用人
	Route::get('/biu_now_user', 'api\MainController@biu_now_user');

	//申请使用网盘
	Route::post('/post_now_user', 'api\MainController@post_now_user');

	//管理员检查
	Route::post('/check_admin', 'api\MainController@check_admin');

	//修改密码
	Route::post('/reset_password', 'api\MainController@reset_password');

	//修改网盘密码
	Route::post('/reset_net_oss', 'api\MainController@reset_net_oss');

	//获取新闻列表
	Route::get('/get_news_list', 'api\MainController@getNewsList');

	//获取新闻详情
	Route::get('/get_news_info/{NewsID}', 'api\MainController@getNewsInfo');
});